﻿
@{
    ViewBag.Title = "GetProduct";
    Layout = "~/Areas/ADMIN/Views/Shared/MasterAdmin.cshtml";
}

@{
    Html.BeginForm("GetProduct", null, FormMethod.Post);
    @*<table>
        <tr>
            <td>site</td>
            <td>@Html.TextBox("site", "http://www.hotdeal.vn")</td>
        </tr>
        <tr>
            <td>Url</td>
            <td>@Html.TextBox("Url", "http://www.hotdeal.vn/ha-noi/thoi-trang-nam/")</td>
        </tr>
        <tr>
            <td>div chua san pham</td>
            <td>@Html.TextBox("divkm","span4 product-item")</td>
        </tr>
        <tr>
            <td>nodeName</td>
            <td>@Html.TextBox("nodeName","div/h2/a")</td>
        </tr>
        <tr>
            <td>iamge</td>
            <td>@Html.TextBox("nodeImage","div/a/img")</td>
             <td>nodeImageAttributes</td>
            <td>@Html.TextBox("nodeImageAttributes", "data-original")</td>
        </tr>
        <tr>
           <td>Link</td>
            <td>@Html.TextBox("nodeLink", "div[@class=\"thumb\"]/a")</td>
            <td>nodeLinkAttributes</td>
            <td>@Html.TextBox("nodeLinkAttributes", "href")</td>
        </tr>
        <tr>
            <td>Giá niêm yết</td>
            <td>@Html.TextBox("nodeGiaNiemYet","div[@class=\"title\"]/span[@class=\"original-price\"]")</td>
        </tr>
         <tr>
            <td>Giá KM</td>
            <td>@Html.TextBox("nodeGiaKM","div[@class=\"title\"]/span[@class=\"sell-price\"]")</td>
        </tr>
         <tr>
            <td>Thời giang</td>
            <td>@Html.TextBox("nodeThoiGian","div/div[@class=\"time\"]/span")</td>
        </tr>
        <tr>
            <td><input type="submit" value="get" /></td>
            <td></td>
        </tr>

    </table>*@

}

<span id="lb_me"></span>/<span id="lb_toal">@Html.Raw(@ViewBag.me)</span>
@section java{
    <script>
        $(document).ready(function () {

            $.ajax({
                url: '@Url.Action("GetProductAjax", "KhuyenMai")',
                type: 'GET',
                cache: false,
                data: 'id=' + '@ViewBag.Id',
            });
            function b() {
                console.log("1");
                $.ajax({
                    async: false,
                    url: '@Url.Action("GetToalSucces", "KhuyenMai")',
                    type: 'GET',
                    cache: false,
                    success: function (strhtml) {
                        if (strhtml != "") {
                            $("#lb_me").text(strhtml);
                            
                        }
                    }
                    
                });
            }
           b();
        });

    </script>
}

